using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Collection.Generic;


namespace Rensselaer_Event_Finder
{
    public class Category
    {
        private int id;
        private string name;
	    private IList<Event> events;
        private IList<Location> locations;
        private Category parent;
        private IList<Category> children; 
        private DateTime createdTime;
        private DateTime editedTime;

        public Category()
        {
	        events = new List<Event>();
            locations = new List<Location>();
            children = new List<Category>();
        }   

        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual string Name
        {
            get { return name; }
            set { name = value; }
        }
        public virtual Category Parent
        {
            get { return parent; }
            set { parent = value; }
        }
        public virtual IList<Category> Children
        {
            get { return children; }
            set { children = value; }
        }
	   public virtual IList<Event> Events
        {
            get { return events; }
            set { events = value; }
        }
    
        public virtual void AddEvent(Event myEvent)
        {
            events.Add(myEvent);
        }

	   public virtual IList<Location> Locations
        {
            get { return locations; }
            set { locations = value; }
        }
    
        public virtual void AddLocation(Location location)
        {
            locations.Add(location);
        }
        public virtual DateTime CreatedTime
        {
            get { return createdTime; }
            set { createdTime = value; }
        }

        public virtual DateTime EditedTime
        {
            get { return editedTime; }
            set { editedTime = value; }
        }

    }

}
